.class public Lcom/waiqin365/lightapp/xgpush/b/a;
.super Ljava/lang/Object;


# static fields
.field private static a:Lcom/waiqin365/lightapp/xgpush/b/a;


# direct methods
.method public constructor <init>()V
    .locals 0

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method

.method public static a()Lcom/waiqin365/lightapp/xgpush/b/a;
    .locals 1

    sget-object v0, Lcom/waiqin365/lightapp/xgpush/b/a;->a:Lcom/waiqin365/lightapp/xgpush/b/a;

    if-nez v0, :cond_0

    new-instance v0, Lcom/waiqin365/lightapp/xgpush/b/a;

    invoke-direct {v0}, Lcom/waiqin365/lightapp/xgpush/b/a;-><init>()V

    sput-object v0, Lcom/waiqin365/lightapp/xgpush/b/a;->a:Lcom/waiqin365/lightapp/xgpush/b/a;

    :cond_0
    sget-object v0, Lcom/waiqin365/lightapp/xgpush/b/a;->a:Lcom/waiqin365/lightapp/xgpush/b/a;

    return-object v0
.end method


# virtual methods
.method public a(Landroid/content/Context;Lcom/tencent/android/tpush/XGPushTextMessage;Lcom/waiqin365/lightapp/xgpush/receiver/a;)V
    .locals 16

    invoke-virtual/range {p2 .. p2}, Lcom/tencent/android/tpush/XGPushTextMessage;->getCustomContent()Ljava/lang/String;

    move-result-object v2

    if-eqz v2, :cond_1

    invoke-virtual {v2}, Ljava/lang/String;->length()I

    move-result v3

    if-eqz v3, :cond_1

    :try_start_0
    new-instance v7, Lorg/json/JSONObject;

    invoke-direct {v7, v2}, Lorg/json/JSONObject;-><init>(Ljava/lang/String;)V

    const-string/jumbo v2, "userId"

    invoke-virtual {v7, v2}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v8

    const-string/jumbo v2, "messageType"

    invoke-virtual {v7, v2}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v9

    const-string/jumbo v2, "url"

    invoke-virtual {v7, v2}, Lorg/json/JSONObject;->has(Ljava/lang/String;)Z

    move-result v2

    if-eqz v2, :cond_2

    const-string/jumbo v2, "url"

    invoke-virtual {v7, v2}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v2

    :goto_0
    const-string/jumbo v3, "push_url"

    invoke-virtual {v7, v3}, Lorg/json/JSONObject;->has(Ljava/lang/String;)Z

    move-result v3

    if-eqz v3, :cond_3

    const-string/jumbo v3, "push_url"

    invoke-virtual {v7, v3}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v4

    :goto_1
    invoke-static {v4}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v3

    if-nez v3, :cond_17

    move-object v6, v4

    :goto_2
    const-string/jumbo v2, "4"

    invoke-virtual {v2, v9}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v2

    if-eqz v2, :cond_5

    const-string/jumbo v2, "CMD:ACTIVE_LOCATION"

    invoke-virtual/range {p2 .. p2}, Lcom/tencent/android/tpush/XGPushTextMessage;->getTitle()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v2, v3}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v2

    if-eqz v2, :cond_4

    const-string/jumbo v2, ","

    invoke-virtual {v6, v2}, Ljava/lang/String;->split(Ljava/lang/String;)[Ljava/lang/String;

    move-result-object v2

    array-length v3, v2

    const/4 v4, 0x4

    if-ne v3, v4, :cond_0

    new-instance v3, Lcom/fiberhome/xpush/f;

    invoke-direct {v3}, Lcom/fiberhome/xpush/f;-><init>()V

    const/4 v4, 0x0

    aget-object v4, v2, v4

    invoke-static {v4}, Ljava/lang/Long;->parseLong(Ljava/lang/String;)J

    move-result-wide v4

    iput-wide v4, v3, Lcom/fiberhome/xpush/f;->a:J

    const/4 v4, 0x1

    aget-object v4, v2, v4

    iput-object v4, v3, Lcom/fiberhome/xpush/f;->b:Ljava/lang/String;

    const/4 v4, 0x2

    aget-object v4, v2, v4

    iput-object v4, v3, Lcom/fiberhome/xpush/f;->c:Ljava/lang/String;

    const/4 v4, 0x3

    aget-object v2, v2, v4

    iput-object v2, v3, Lcom/fiberhome/xpush/f;->d:Ljava/lang/String;

    new-instance v2, Landroid/content/Intent;

    const-class v4, Lcom/fiberhome/xpush/ImmediateLocService;

    move-object/from16 v0, p1

    invoke-direct {v2, v0, v4}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    new-instance v4, Ljava/lang/StringBuilder;

    invoke-direct {v4}, Ljava/lang/StringBuilder;-><init>()V

    invoke-static {}, Lcom/fiberhome/gaea/client/c/b;->d()Ljava/lang/String;

    move-result-object v5

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    const-string/jumbo v5, "/services/xLocService"

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v4

    new-instance v5, Ljava/lang/StringBuilder;

    invoke-direct {v5}, Ljava/lang/StringBuilder;-><init>()V

    const-string/jumbo v6, "\u7acb\u5373\u5b9a\u4f4d\u4e0a\u4f20\u5730\u5740\uff1a"

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {v5, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v5

    invoke-static {v5}, Lcom/fiberhome/xpush/h;->a(Ljava/lang/String;)V

    const-string/jumbo v5, "url"

    invoke-virtual {v2, v5, v4}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

    const-string/jumbo v4, "locinfo"

    invoke-virtual {v2, v4, v3}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/io/Serializable;)Landroid/content/Intent;

    move-object/from16 v0, p1

    invoke-virtual {v0, v2}, Landroid/content/Context;->startService(Landroid/content/Intent;)Landroid/content/ComponentName;

    :cond_0
    :goto_3
    const-string/jumbo v2, "messageId"

    invoke-virtual {v7, v2}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v2

    move-object/from16 v0, p3

    move-object/from16 v1, p1

    invoke-interface {v0, v2, v1}, Lcom/waiqin365/lightapp/xgpush/receiver/a;->a(Ljava/lang/String;Landroid/content/Context;)V

    :cond_1
    :goto_4
    return-void

    :cond_2
    const-string/jumbo v2, ""

    goto/16 :goto_0

    :cond_3
    const-string/jumbo v4, ""

    goto/16 :goto_1

    :cond_4
    const-string/jumbo v2, "CMD:ACTIVE_TASK"

    invoke-virtual/range {p2 .. p2}, Lcom/tencent/android/tpush/XGPushTextMessage;->getTitle()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v2, v3}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v2

    if-eqz v2, :cond_0

    const-wide/16 v2, -0x1

    invoke-static {v6, v2, v3}, Lcom/fiberhome/gaea/client/d/k;->a(Ljava/lang/String;J)J

    move-result-wide v2

    new-instance v4, Ljava/lang/StringBuilder;

    invoke-direct {v4}, Ljava/lang/StringBuilder;-><init>()V

    const-string/jumbo v5, "\u63d0\u793a:\u6536\u5230push\u6d88\u606f\uff0cvalidtime:"

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    invoke-virtual {v4, v2, v3}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;

    move-result-object v4

    invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v4

    invoke-static {v4}, Lcom/fiberhome/xloc/c/a;->a(Ljava/lang/String;)V

    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    move-result-wide v4

    cmp-long v4, v2, v4

    if-ltz v4, :cond_0

    new-instance v4, Ljava/lang/StringBuilder;

    invoke-direct {v4}, Ljava/lang/StringBuilder;-><init>()V

    const-string/jumbo v5, "\u63d0\u793a:\u91cd\u65b0\u542f\u52a8\u5b9a\u4f4d\u670d\u52a1\uff0cvalidtime:"

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    invoke-virtual {v4, v2, v3}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    invoke-static {v2}, Lcom/fiberhome/xloc/c/a;->a(Ljava/lang/String;)V

    invoke-static/range {p1 .. p1}, Lcom/fiberhome/xloc/broadcast/LocTaskReceiver;->a(Landroid/content/Context;)V

    invoke-static/range {p1 .. p1}, Lcom/fiberhome/xloc/broadcast/LocTaskReceiver;->b(Landroid/content/Context;)V
    :try_end_0
    .catch Lorg/json/JSONException; {:try_start_0 .. :try_end_0} :catch_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_1

    goto :goto_3

    :catch_0
    move-exception v2

    new-instance v3, Ljava/lang/StringBuilder;

    invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V

    const-string/jumbo v4, "handlepush jsonexception:"

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v2}, Lorg/json/JSONException;->getMessage()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v3, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    invoke-static {v2}, Lcom/fiberhome/xpush/g;->a(Ljava/lang/String;)V

    goto :goto_4

    :cond_5
    :try_start_1
    const-string/jumbo v2, "0"

    invoke-virtual {v2, v9}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v2

    if-eqz v2, :cond_7

    const-string/jumbo v2, "messageId"

    invoke-static {}, Ljava/util/UUID;->randomUUID()Ljava/util/UUID;

    move-result-object v3

    invoke-virtual {v3}, Ljava/util/UUID;->toString()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v7, v2, v3}, Lorg/json/JSONObject;->optString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v5

    const-string/jumbo v2, "sendTime"

    const-wide/16 v10, 0x0

    invoke-static {v10, v11}, Lcom/fiberhome/gaea/client/d/k;->a(J)Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v7, v2, v3}, Lorg/json/JSONObject;->optString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v2

    const-string/jumbo v3, "summary"

    const-string/jumbo v6, ""

    invoke-virtual {v7, v3, v6}, Lorg/json/JSONObject;->optString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v6

    invoke-virtual/range {p2 .. p2}, Lcom/tencent/android/tpush/XGPushTextMessage;->getTitle()Ljava/lang/String;

    move-result-object v8

    const-string/jumbo v3, "sendDepartName"

    const-string/jumbo v10, ""

    invoke-virtual {v7, v3, v10}, Lorg/json/JSONObject;->optString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v10

    const-string/jumbo v3, "cover_image"

    const-string/jumbo v11, ""

    invoke-virtual {v7, v3, v11}, Lorg/json/JSONObject;->optString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
    :try_end_1
    .catch Lorg/json/JSONException; {:try_start_1 .. :try_end_1} :catch_0
    .catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_1

    move-result-object v11

    :try_start_2
    const-string/jumbo v3, "yyyy-MM-dd HH:mm:ss"

    invoke-static {v2, v3}, Lcom/waiqin365/lightapp/kaoqin/f/a;->a(Ljava/lang/String;Ljava/lang/String;)Ljava/util/Date;

    move-result-object v3

    invoke-virtual {v3}, Ljava/util/Date;->getTime()J
    :try_end_2
    .catch Ljava/lang/Exception; {:try_start_2 .. :try_end_2} :catch_2
    .catch Lorg/json/JSONException; {:try_start_2 .. :try_end_2} :catch_0

    move-result-wide v2

    :goto_5
    :try_start_3
    invoke-static {}, Lcom/hyphenate/chat/EMClient;->getInstance()Lcom/hyphenate/chat/EMClient;

    move-result-object v12

    invoke-virtual {v12}, Lcom/hyphenate/chat/EMClient;->chatManager()Lcom/hyphenate/chat/EMChatManager;

    move-result-object v12

    const-string/jumbo v13, "waiqin365kefu"

    sget-object v14, Lcom/hyphenate/chat/EMConversation$EMConversationType;->Chat:Lcom/hyphenate/chat/EMConversation$EMConversationType;

    const/4 v15, 0x1

    invoke-virtual {v12, v13, v14, v15}, Lcom/hyphenate/chat/EMChatManager;->getConversation(Ljava/lang/String;Lcom/hyphenate/chat/EMConversation$EMConversationType;Z)Lcom/hyphenate/chat/EMConversation;

    move-result-object v12

    sget-object v13, Lcom/hyphenate/chat/EMMessage$Type;->TXT:Lcom/hyphenate/chat/EMMessage$Type;

    invoke-static {v13}, Lcom/hyphenate/chat/EMMessage;->createReceiveMessage(Lcom/hyphenate/chat/EMMessage$Type;)Lcom/hyphenate/chat/EMMessage;

    move-result-object v13

    const-string/jumbo v14, "is_fw_notification"

    const/4 v15, 0x1

    invoke-virtual {v13, v14, v15}, Lcom/hyphenate/chat/EMMessage;->setAttribute(Ljava/lang/String;Z)V

    invoke-virtual {v13, v5}, Lcom/hyphenate/chat/EMMessage;->setMsgId(Ljava/lang/String;)V

    invoke-virtual {v13, v2, v3}, Lcom/hyphenate/chat/EMMessage;->setMsgTime(J)V

    const/4 v2, 0x1

    invoke-virtual {v13, v2}, Lcom/hyphenate/chat/EMMessage;->setUnread(Z)V

    const/4 v2, 0x0

    invoke-virtual {v13, v2}, Lcom/hyphenate/chat/EMMessage;->setAcked(Z)V

    const-string/jumbo v2, "waiqin365kefu"

    invoke-virtual {v13, v2}, Lcom/hyphenate/chat/EMMessage;->setFrom(Ljava/lang/String;)V

    new-instance v2, Lcom/hyphenate/chat/EMTextMessageBody;

    invoke-direct {v2, v8}, Lcom/hyphenate/chat/EMTextMessageBody;-><init>(Ljava/lang/String;)V

    invoke-virtual {v13, v2}, Lcom/hyphenate/chat/EMMessage;->addBody(Lcom/hyphenate/chat/EMMessageBody;)V

    const-string/jumbo v2, "fw_content"

    invoke-virtual {v13, v2, v6}, Lcom/hyphenate/chat/EMMessage;->setAttribute(Ljava/lang/String;Ljava/lang/String;)V

    const-string/jumbo v2, "fw_image"

    invoke-virtual {v13, v2, v11}, Lcom/hyphenate/chat/EMMessage;->setAttribute(Ljava/lang/String;Ljava/lang/String;)V

    const-string/jumbo v2, "fw_url"

    invoke-virtual {v13, v2, v4}, Lcom/hyphenate/chat/EMMessage;->setAttribute(Ljava/lang/String;Ljava/lang/String;)V

    new-instance v2, Ljava/util/ArrayList;

    invoke-direct {v2}, Ljava/util/ArrayList;-><init>()V

    invoke-interface {v2, v13}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    invoke-virtual {v12, v13}, Lcom/hyphenate/chat/EMConversation;->insertMessage(Lcom/hyphenate/chat/EMMessage;)V

    invoke-static/range {p1 .. p1}, Lcom/waiqin365/lightapp/im/utils/l;->a(Landroid/content/Context;)Lcom/waiqin365/lightapp/im/utils/l;

    move-result-object v2

    invoke-virtual {v2, v10}, Lcom/waiqin365/lightapp/im/utils/l;->g(Ljava/lang/String;)Z

    move-result v2

    if-nez v2, :cond_6

    move-object/from16 v0, p0

    move-object/from16 v1, p1

    invoke-virtual {v0, v1, v8, v9, v10}, Lcom/waiqin365/lightapp/xgpush/b/a;->a(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V

    :cond_6
    invoke-static {}, Lcom/waiqin365/lightapp/im/utils/f;->a()Ljava/util/Observable;

    move-result-object v2

    invoke-virtual {v2}, Ljava/util/Observable;->notifyObservers()V

    invoke-static {}, Lcom/waiqin365/lightapp/im/utils/f;->a()Ljava/util/Observable;

    move-result-object v2

    const-string/jumbo v3, "serviceUpdateData"

    invoke-virtual {v2, v3}, Ljava/util/Observable;->notifyObservers(Ljava/lang/Object;)V
    :try_end_3
    .catch Lorg/json/JSONException; {:try_start_3 .. :try_end_3} :catch_0
    .catch Ljava/lang/Exception; {:try_start_3 .. :try_end_3} :catch_1

    goto/16 :goto_3

    :catch_1
    move-exception v2

    new-instance v3, Ljava/lang/StringBuilder;

    invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V

    const-string/jumbo v4, "handlepush exception:"

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v2}, Ljava/lang/Exception;->getMessage()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v3, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    invoke-static {v2}, Lcom/fiberhome/xpush/g;->a(Ljava/lang/String;)V

    goto/16 :goto_4

    :catch_2
    move-exception v3

    :try_start_4
    const-string/jumbo v3, "yyyy-MM-dd HH:mm"

    invoke-static {v2, v3}, Lcom/waiqin365/lightapp/kaoqin/f/a;->a(Ljava/lang/String;Ljava/lang/String;)Ljava/util/Date;

    move-result-object v2

    invoke-virtual {v2}, Ljava/util/Date;->getTime()J
    :try_end_4
    .catch Ljava/lang/Exception; {:try_start_4 .. :try_end_4} :catch_3
    .catch Lorg/json/JSONException; {:try_start_4 .. :try_end_4} :catch_0

    move-result-wide v2

    goto/16 :goto_5

    :catch_3
    move-exception v2

    :try_start_5
    new-instance v2, Ljava/util/Date;

    invoke-direct {v2}, Ljava/util/Date;-><init>()V

    invoke-virtual {v2}, Ljava/util/Date;->getTime()J

    move-result-wide v2

    goto/16 :goto_5

    :cond_7
    invoke-static/range {p1 .. p1}, Lcom/waiqin365/base/db/imnotice/f;->a(Landroid/content/Context;)Lcom/waiqin365/base/db/imnotice/f;

    move-result-object v2

    invoke-virtual {v2, v9, v8}, Lcom/waiqin365/base/db/imnotice/f;->b(Ljava/lang/String;Ljava/lang/String;)Lcom/waiqin365/base/db/imnotice/e;

    move-result-object v2

    if-nez v2, :cond_16

    new-instance v2, Lcom/waiqin365/base/db/imnotice/e;

    invoke-direct {v2}, Lcom/waiqin365/base/db/imnotice/e;-><init>()V

    sget-object v3, Lcom/waiqin365/lightapp/im/a;->n:Ljava/lang/String;

    const-string/jumbo v3, "xiaomishu xms"

    const-string/jumbo v3, "2"

    invoke-virtual {v3, v9}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v3

    if-eqz v3, :cond_a

    new-instance v3, Ljava/lang/StringBuilder;

    invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V

    const-string/jumbo v4, "daibanrenwu_chatid"

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v5

    sget-object v4, Lcom/waiqin365/lightapp/im/a;->o:Ljava/lang/String;

    const-string/jumbo v3, "daibangongzuo dbgz"

    :goto_6
    invoke-virtual {v2, v8}, Lcom/waiqin365/base/db/imnotice/e;->e(Ljava/lang/String;)V

    invoke-virtual {v2, v9}, Lcom/waiqin365/base/db/imnotice/e;->b(Ljava/lang/String;)V

    invoke-virtual {v2, v5}, Lcom/waiqin365/base/db/imnotice/e;->a(Ljava/lang/String;)V

    invoke-virtual {v2, v4}, Lcom/waiqin365/base/db/imnotice/e;->c(Ljava/lang/String;)V

    invoke-virtual {v2, v3}, Lcom/waiqin365/base/db/imnotice/e;->d(Ljava/lang/String;)V

    move-object v3, v2

    :goto_7
    invoke-virtual {v3}, Lcom/waiqin365/base/db/imnotice/e;->e()I

    move-result v2

    add-int/lit8 v2, v2, 0x1

    invoke-virtual {v3, v2}, Lcom/waiqin365/base/db/imnotice/e;->a(I)V

    invoke-static/range {p1 .. p1}, Lcom/waiqin365/base/db/imnotice/f;->a(Landroid/content/Context;)Lcom/waiqin365/base/db/imnotice/f;

    move-result-object v2

    invoke-virtual {v2, v3}, Lcom/waiqin365/base/db/imnotice/f;->a(Lcom/waiqin365/base/db/imnotice/e;)Z

    move-result v2

    if-eqz v2, :cond_0

    new-instance v4, Lcom/waiqin365/base/db/imnotice/g;

    invoke-direct {v4}, Lcom/waiqin365/base/db/imnotice/g;-><init>()V

    const-string/jumbo v2, "3"

    invoke-virtual {v2, v9}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v2

    if-nez v2, :cond_8

    const-string/jumbo v2, "2"

    invoke-virtual {v2, v9}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v2

    if-eqz v2, :cond_e

    :cond_8
    invoke-virtual {v3}, Lcom/waiqin365/base/db/imnotice/e;->a()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v4, v2}, Lcom/waiqin365/base/db/imnotice/g;->a(Ljava/lang/String;)V

    const-string/jumbo v2, "1"

    invoke-virtual {v4, v2}, Lcom/waiqin365/base/db/imnotice/g;->d(Ljava/lang/String;)V

    :goto_8
    invoke-virtual {v3}, Lcom/waiqin365/base/db/imnotice/e;->a()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v4, v2}, Lcom/waiqin365/base/db/imnotice/g;->c(Ljava/lang/String;)V

    invoke-virtual {v4, v9}, Lcom/waiqin365/base/db/imnotice/g;->e(Ljava/lang/String;)V

    const-string/jumbo v2, "moudle"

    invoke-virtual {v7, v2}, Lorg/json/JSONObject;->has(Ljava/lang/String;)Z

    move-result v2

    if-eqz v2, :cond_10

    const-string/jumbo v2, "moudle"

    invoke-virtual {v7, v2}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v2

    :goto_9
    invoke-virtual {v4, v2}, Lcom/waiqin365/base/db/imnotice/g;->f(Ljava/lang/String;)V

    const-string/jumbo v2, "moudleId"

    invoke-virtual {v7, v2}, Lorg/json/JSONObject;->has(Ljava/lang/String;)Z

    move-result v2

    if-eqz v2, :cond_11

    const-string/jumbo v2, "moudleId"

    invoke-virtual {v7, v2}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v2

    :goto_a
    invoke-virtual {v4, v2}, Lcom/waiqin365/base/db/imnotice/g;->g(Ljava/lang/String;)V

    const-string/jumbo v2, "sendTime"

    invoke-virtual {v7, v2}, Lorg/json/JSONObject;->has(Ljava/lang/String;)Z

    move-result v2

    if-eqz v2, :cond_12

    const-string/jumbo v2, "sendTime"

    invoke-virtual {v7, v2}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v2

    :goto_b
    invoke-virtual {v4, v2}, Lcom/waiqin365/base/db/imnotice/g;->k(Ljava/lang/String;)V

    const-wide/16 v10, 0x0

    invoke-static {v10, v11}, Lcom/fiberhome/gaea/client/d/k;->a(J)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v4, v2}, Lcom/waiqin365/base/db/imnotice/g;->h(Ljava/lang/String;)V

    invoke-virtual {v4, v6}, Lcom/waiqin365/base/db/imnotice/g;->m(Ljava/lang/String;)V

    invoke-virtual {v4, v8}, Lcom/waiqin365/base/db/imnotice/g;->n(Ljava/lang/String;)V

    const-string/jumbo v2, "sendName"

    invoke-virtual {v7, v2}, Lorg/json/JSONObject;->has(Ljava/lang/String;)Z

    move-result v2

    if-eqz v2, :cond_13

    const-string/jumbo v2, "sendName"

    invoke-virtual {v7, v2}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v2

    :goto_c
    invoke-virtual {v4, v2}, Lcom/waiqin365/base/db/imnotice/g;->j(Ljava/lang/String;)V

    const-string/jumbo v2, "sendDepartName"

    invoke-virtual {v7, v2}, Lorg/json/JSONObject;->has(Ljava/lang/String;)Z

    move-result v2

    if-eqz v2, :cond_14

    const-string/jumbo v2, "sendDepartName"

    invoke-virtual {v7, v2}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v2

    :goto_d
    invoke-virtual {v4, v2}, Lcom/waiqin365/base/db/imnotice/g;->i(Ljava/lang/String;)V

    const-string/jumbo v2, "3"

    invoke-virtual {v2, v9}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v2

    if-eqz v2, :cond_15

    new-instance v2, Ljava/lang/StringBuilder;

    invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v4}, Lcom/waiqin365/base/db/imnotice/g;->j()Ljava/lang/String;

    move-result-object v5

    invoke-virtual {v2, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    const-string/jumbo v5, ":"

    invoke-virtual {v2, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual/range {p2 .. p2}, Lcom/tencent/android/tpush/XGPushTextMessage;->getTitle()Ljava/lang/String;

    move-result-object v5

    invoke-virtual {v2, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v4, v2}, Lcom/waiqin365/base/db/imnotice/g;->l(Ljava/lang/String;)V

    :goto_e
    invoke-static/range {p1 .. p1}, Lcom/waiqin365/base/db/imnotice/f;->a(Landroid/content/Context;)Lcom/waiqin365/base/db/imnotice/f;

    move-result-object v2

    const/4 v5, 0x0

    invoke-virtual {v2, v4, v5}, Lcom/waiqin365/base/db/imnotice/f;->a(Lcom/waiqin365/base/db/imnotice/g;Z)Z

    move-result v2

    if-eqz v2, :cond_0

    invoke-static/range {p1 .. p1}, Lcom/waiqin365/lightapp/im/utils/l;->a(Landroid/content/Context;)Lcom/waiqin365/lightapp/im/utils/l;

    move-result-object v2

    invoke-virtual {v3}, Lcom/waiqin365/base/db/imnotice/e;->a()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v2, v3}, Lcom/waiqin365/lightapp/im/utils/l;->g(Ljava/lang/String;)Z

    move-result v2

    if-nez v2, :cond_9

    invoke-virtual/range {p2 .. p2}, Lcom/tencent/android/tpush/XGPushTextMessage;->getTitle()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v4}, Lcom/waiqin365/base/db/imnotice/g;->e()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v4}, Lcom/waiqin365/base/db/imnotice/g;->n()Ljava/lang/String;

    move-result-object v4

    move-object/from16 v0, p0

    move-object/from16 v1, p1

    invoke-virtual {v0, v1, v2, v3, v4}, Lcom/waiqin365/lightapp/xgpush/b/a;->a(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V

    :cond_9
    invoke-static {}, Lcom/waiqin365/lightapp/im/utils/f;->a()Ljava/util/Observable;

    move-result-object v2

    invoke-virtual {v2}, Ljava/util/Observable;->notifyObservers()V

    goto/16 :goto_3

    :cond_a
    const-string/jumbo v3, "3"

    invoke-virtual {v3, v9}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v3

    if-eqz v3, :cond_b

    new-instance v3, Ljava/lang/StringBuilder;

    invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V

    const-string/jumbo v4, "tongzhigonggao_chatid"

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v5

    sget-object v4, Lcom/waiqin365/lightapp/im/a;->p:Ljava/lang/String;

    const-string/jumbo v3, "tongzhigonggao tzgg"

    goto/16 :goto_6

    :cond_b
    const-string/jumbo v3, "0"

    invoke-virtual {v3, v9}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v3

    if-eqz v3, :cond_c

    new-instance v3, Ljava/lang/StringBuilder;

    invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V

    const-string/jumbo v4, "wq365_chatid"

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v5

    sget-object v4, Lcom/waiqin365/lightapp/im/a;->r:Ljava/lang/String;

    const-string/jumbo v3, "waiqin365tuandui wq365td"

    goto/16 :goto_6

    :cond_c
    const-string/jumbo v3, "5"

    invoke-virtual {v3, v9}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v3

    if-eqz v3, :cond_d

    new-instance v3, Ljava/lang/StringBuilder;

    invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V

    const-string/jumbo v4, "managerhelp_chatid"

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v5

    sget-object v4, Lcom/waiqin365/lightapp/im/a;->s:Ljava/lang/String;

    const-string/jumbo v3, "guanlizhushou glzs"

    goto/16 :goto_6

    :cond_d
    new-instance v3, Ljava/lang/StringBuilder;

    invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V

    const-string/jumbo v4, "xiaomishu_chatid"

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v5

    sget-object v4, Lcom/waiqin365/lightapp/im/a;->n:Ljava/lang/String;

    const-string/jumbo v3, "xiaomishu xms"

    goto/16 :goto_6

    :cond_e
    const-string/jumbo v2, "messageId"

    invoke-virtual {v7, v2}, Lorg/json/JSONObject;->has(Ljava/lang/String;)Z

    move-result v2

    if-eqz v2, :cond_f

    const-string/jumbo v2, "messageId"

    invoke-virtual {v7, v2}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v2

    :goto_f
    invoke-virtual {v4, v2}, Lcom/waiqin365/base/db/imnotice/g;->a(Ljava/lang/String;)V

    const-string/jumbo v2, "0"

    invoke-virtual {v4, v2}, Lcom/waiqin365/base/db/imnotice/g;->d(Ljava/lang/String;)V

    goto/16 :goto_8

    :cond_f
    const-string/jumbo v2, ""

    goto :goto_f

    :cond_10
    const-string/jumbo v2, ""

    goto/16 :goto_9

    :cond_11
    const-string/jumbo v2, ""

    goto/16 :goto_a

    :cond_12
    const-string/jumbo v2, ""

    goto/16 :goto_b

    :cond_13
    const-string/jumbo v2, ""

    goto/16 :goto_c

    :cond_14
    const-string/jumbo v2, ""

    goto/16 :goto_d

    :cond_15
    invoke-virtual/range {p2 .. p2}, Lcom/tencent/android/tpush/XGPushTextMessage;->getTitle()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v4, v2}, Lcom/waiqin365/base/db/imnotice/g;->l(Ljava/lang/String;)V
    :try_end_5
    .catch Lorg/json/JSONException; {:try_start_5 .. :try_end_5} :catch_0
    .catch Ljava/lang/Exception; {:try_start_5 .. :try_end_5} :catch_1

    goto/16 :goto_e

    :cond_16
    move-object v3, v2

    goto/16 :goto_7

    :cond_17
    move-object v6, v2

    goto/16 :goto_2
.end method

.method public a(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
    .locals 8

    const v7, 0x7f020450

    const/4 v6, 0x1

    const-string/jumbo v0, "notification"

    invoke-virtual {p1, v0}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/app/NotificationManager;

    const v1, 0x7f080197

    invoke-virtual {p1, v1}, Landroid/content/Context;->getString(I)Ljava/lang/String;

    move-result-object v1

    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    invoke-static {}, Ljava/util/Calendar;->getInstance()Ljava/util/Calendar;

    if-eqz p2, :cond_1

    invoke-virtual {p2}, Ljava/lang/String;->length()I

    move-result v2

    if-lez v2, :cond_1

    :goto_0
    invoke-static {p1}, Lcom/waiqin365/base/db/imnotice/f;->a(Landroid/content/Context;)Lcom/waiqin365/base/db/imnotice/f;

    move-result-object v1

    invoke-virtual {v1, p4}, Lcom/waiqin365/base/db/imnotice/f;->g(Ljava/lang/String;)J

    move-result-wide v2

    new-instance v1, Ljava/lang/String;

    invoke-direct {v1}, Ljava/lang/String;-><init>()V

    const-wide/16 v4, 0x1

    cmp-long v1, v2, v4

    if-lez v1, :cond_0

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const v4, 0x7f080572

    invoke-virtual {p1, v4}, Landroid/content/Context;->getString(I)Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v1, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1, v2, v3}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;

    move-result-object v1

    const v2, 0x7f080571

    invoke-virtual {p1, v2}, Landroid/content/Context;->getString(I)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    :goto_1
    new-instance v2, Landroid/content/Intent;

    const-class v3, Lcom/waiqin365/lightapp/xgpush/receiver/LocalPushReceiver;

    invoke-direct {v2, p1, v3}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    const-string/jumbo v3, "messageType"

    invoke-virtual {v2, v3, p3}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

    new-instance v3, Ljava/lang/StringBuilder;

    invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {p1}, Landroid/content/Context;->getApplicationInfo()Landroid/content/pm/ApplicationInfo;

    move-result-object v4

    iget-object v4, v4, Landroid/content/pm/ApplicationInfo;->packageName:Ljava/lang/String;

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    const-string/jumbo v4, "com.waiqin.lightapp.xgpush.openpage"

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v2, v3}, Landroid/content/Intent;->setAction(Ljava/lang/String;)Landroid/content/Intent;

    const/4 v3, 0x0

    const/high16 v4, 0x8000000

    invoke-static {p1, v3, v2, v4}, Landroid/app/PendingIntent;->getBroadcast(Landroid/content/Context;ILandroid/content/Intent;I)Landroid/app/PendingIntent;

    move-result-object v2

    new-instance v3, Landroid/app/Notification$Builder;

    invoke-direct {v3, p1}, Landroid/app/Notification$Builder;-><init>(Landroid/content/Context;)V

    invoke-virtual {v3, v7}, Landroid/app/Notification$Builder;->setSmallIcon(I)Landroid/app/Notification$Builder;

    move-result-object v3

    invoke-virtual {p1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v4

    invoke-static {v4, v7}, Landroid/graphics/BitmapFactory;->decodeResource(Landroid/content/res/Resources;I)Landroid/graphics/Bitmap;

    move-result-object v4

    invoke-virtual {v3, v4}, Landroid/app/Notification$Builder;->setLargeIcon(Landroid/graphics/Bitmap;)Landroid/app/Notification$Builder;

    move-result-object v3

    invoke-virtual {v3, p2}, Landroid/app/Notification$Builder;->setTicker(Ljava/lang/CharSequence;)Landroid/app/Notification$Builder;

    move-result-object v3

    invoke-virtual {v3, p2}, Landroid/app/Notification$Builder;->setContentTitle(Ljava/lang/CharSequence;)Landroid/app/Notification$Builder;

    move-result-object v3

    invoke-virtual {v3, v1}, Landroid/app/Notification$Builder;->setContentText(Ljava/lang/CharSequence;)Landroid/app/Notification$Builder;

    move-result-object v1

    invoke-virtual {v1, v2}, Landroid/app/Notification$Builder;->setContentIntent(Landroid/app/PendingIntent;)Landroid/app/Notification$Builder;

    move-result-object v1

    invoke-virtual {v1}, Landroid/app/Notification$Builder;->getNotification()Landroid/app/Notification;

    move-result-object v1

    iget v3, v1, Landroid/app/Notification;->flags:I

    or-int/lit8 v3, v3, 0x10

    iput v3, v1, Landroid/app/Notification;->flags:I

    iput-object v2, v1, Landroid/app/Notification;->contentIntent:Landroid/app/PendingIntent;

    const/16 v2, 0x1388

    iput v2, v1, Landroid/app/Notification;->ledOnMS:I

    iput v6, v1, Landroid/app/Notification;->ledARGB:I

    invoke-static {}, Lcom/fiberhome/gaea/client/c/b;->c()Lcom/fiberhome/gaea/client/c/c;

    move-result-object v2

    iget-object v2, v2, Lcom/fiberhome/gaea/client/c/c;->a:Ljava/lang/String;

    invoke-static {v2}, Ljava/lang/Integer;->parseInt(Ljava/lang/String;)I

    move-result v2

    packed-switch v2, :pswitch_data_0

    iput v6, v1, Landroid/app/Notification;->defaults:I

    :goto_2
    invoke-virtual {v0, v7, v1}, Landroid/app/NotificationManager;->notify(ILandroid/app/Notification;)V

    return-void

    :cond_0
    const v1, 0x7f080573

    invoke-virtual {p1, v1}, Landroid/content/Context;->getString(I)Ljava/lang/String;

    move-result-object v1

    goto/16 :goto_1

    :pswitch_0
    const/4 v2, 0x2

    iput v2, v1, Landroid/app/Notification;->defaults:I

    goto :goto_2

    :pswitch_1
    iput v6, v1, Landroid/app/Notification;->defaults:I

    goto :goto_2

    :cond_1
    move-object p2, v1

    goto/16 :goto_0

    :pswitch_data_0
    .packed-switch 0x0
        :pswitch_0
        :pswitch_1
    .end packed-switch
.end method
